// 渲染搜索页
define(() => {
    return function (res, ele) {
        let str = "";
        res.forEach(val => {
            // str += `<li index="${val.goodsId}">
            //             <a href="../goods.html?id=${val.goodsId}">
            //                 <img src="${val.proImg}" alt="">
            //                 <span>${val.price}</span>
            //             </a>
            //             <button class="add">加入购物车</button>
            //         </li>`

            str += `<div class="picture-2-1" index="${val.id}">
                        <a href="../paging.html?id=${val.id}">
                            <img src="${val.img}">
                        </a>
                        <p class="p-1">${val.name}</p>
                        <p class="p-2">
                            <span>${val.price}</span>
                            <span class="p-3">销量16022笔</span>
                            <button class="add">加入购物车</button>
                        </p>
                    </div>`
        })
        ele.html(str);
    }
})